#ifndef FRIENDMASSAGER_H
#define FRIENDMASSAGER_H

#include <QWidget>
#include <QListWidgetItem>
#include <QTreeWidget>
#include <QTreeWidgetItem>
#include "protocol.h"
#include <QMap>
#include <QJsonObject>
#include <QJsonArray>
#include <QJsonDocument>
namespace Ui {
class FriendMassager;
}

class FriendMassager : public QWidget
{
    Q_OBJECT

public:
    explicit FriendMassager(QWidget *parent = nullptr);
    ~FriendMassager();
    void SetFriendItem(QString HeadPic,QString Name,QString Sign,int Status,int Div);
    void InitForUi();

    void InitHandler();

    void linkTcpServiceSignalAndSlot();

private slots:
    void on_FriendInformBtn_clicked();

    void ActNoticeAddFriendSlot(QJsonObject);

    void on_FlashFriendBtn_clicked();

    void ActFriendListRespond(QJsonObject);

signals:
    void Sig_PullFriendList(myuint Type,QJsonObject Body);

private:
    Ui::FriendMassager *ui;

    QMap<myuint,QTreeWidgetItem*>FriendDivideHandler;

    void ReSetFriendTree();
};

#endif // FRIENDMASSAGER_H
